package org.snail.exception;

import lombok.Data;

@Data
public class BaseException extends Exception {
    private static final long serialVersionUID = 1L;
    private Integer errCode;
    private Object errObj;

    public BaseException(Integer errcode, Object errObj) {
        this.errCode = errcode;
        this.errObj = errObj;
    }

    public BaseException(Integer errcode, String message) {
        super(message);
        this.errCode = errcode;
    }

    public BaseException(Integer errcode, String message, Object errObj) {
        super(message);
        this.errCode = errcode;
        this.errObj = errObj;
    }

    public BaseException(String message, Throwable cause, Integer errcode, Object errObj) {
        super(message, cause);
        this.errCode = errcode;
        this.errObj = errObj;
    }

    public BaseException(Throwable cause, Integer errcode, Object errObj) {
        super(cause);
        this.errCode = errcode;
        this.errObj = errObj;
    }
}